package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.PrivilegeGasConf;
import com.sc.nft.mapper.PrivilegeGasConfMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * 合成上链费配置(sc_privilege_gas_conf)数据DAO
 *
 * @author jinpinhai
 * @since 2024-12-23 17:41:46
 * @description Generator
 */
@Slf4j
@Repository
public class PrivilegeGasConfDao extends ServiceImpl<PrivilegeGasConfMapper, PrivilegeGasConf> {

    public PrivilegeGasConf getPrivilegeGasConfByProductId(Long productId) {
        LambdaQueryWrapper<PrivilegeGasConf> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(PrivilegeGasConf::getProductId,productId);
        return getOne(queryWrapper);
    }

}